import type { PageParams } from '@/types/global'
import type { HotResult } from '@/types/hot'
import { http } from '@/utils/http'

type HotPageParams = PageParams & {
  /** Tab 项的 id，默认查询全部 Tab 项的第 1 页数据 */
  subType?: string
}

/** 封装热点推荐的接口 */
export const getHot = (url: string, data?: HotPageParams) => {
  return http<HotResult>({
    method: 'GET',
    url,
    data,
  })
}
